import request from '@/utils/request'

// 通用上传文件
export const uploadFile = (data) => {
  return request({
    url: '/yuxi/fileattachment/upload',
    method: 'post',
    data,
    formData: true
  })
}

// 编辑文件：分组
export const updateFile = (data) => {
  return request({
    url: '/yuxi/fileattachment/group/update',
    method: 'put',
    data
  })
}

// 删除文件
export const delFile = (id) => {
  return request({
    url: `/yuxi/fileattachment/delete/${id}`,
    method: 'delete'
  })
}
